<template>
    <div class="page">
        <el-row :gutter="20">
            <el-col :span="24" :xs="24" :sm="24" :lg="24">
                <div class="grid-content bg-purple">
                    <div class="panel">
                        <div class="panel-body">
                            <el-row :gutter="20">
                                <el-col :span="24" :xs="24" :sm="24" :lg="24">
                                    <el-row :gutter="20" v-loading="listLoading">
                                        <el-col :span="8"  >
                                            <el-card class="box-card">
                                                <div slot="header" class="clearfix">
                                                    <el-row type="flex"  justify="space-between" :gutter="20">
                                                        <el-col :span="24"><h3 class="whiteFont text-center">入库</h3></el-col>
                                                    </el-row>
                                                </div>
                                                <div class="text item text-center">
                                                    {{Data.entry_total}}
                                                </div>
                                            </el-card>
                                        </el-col>
                                        <el-col :span="8"  >
                                            <el-card class="box-card">
                                                <div slot="header" class="clearfix">
                                                    <el-row type="flex"  justify="space-between" :gutter="20">
                                                        <el-col :span="24"><h3 class="whiteFont text-center">自提件</h3></el-col>
                                                    </el-row>
                                                </div>
                                                <div class="text item text-center">
                                                    {{Data.zt_entry}}
                                                </div>
                                            </el-card>
                                        </el-col>
                                        <el-col :span="8"  >
                                            <el-card class="box-card">
                                                <div slot="header" class="clearfix">
                                                    <el-row type="flex"  justify="space-between" :gutter="20">
                                                        <el-col :span="24"><h3 class="whiteFont text-center">派送件</h3></el-col>
                                                    </el-row>
                                                </div>
                                                <div class="text item text-center">
                                                    {{Data.ps_entry}}
                                                </div>
                                            </el-card>
                                        </el-col>
                                        <el-col :span="8"  >
                                            <el-card class="box-card">
                                                <div slot="header" class="clearfix">
                                                    <el-row type="flex"  justify="space-between" :gutter="20">
                                                        <el-col :span="24"><h3 class="whiteFont text-center">签收</h3></el-col>
                                                    </el-row>
                                                </div>
                                                <div class="text item text-center">
                                                    {{Data.sign_total}}
                                                </div>
                                            </el-card>
                                        </el-col>
                                        <el-col :span="8"  >
                                            <el-card class="box-card">
                                                <div slot="header" class="clearfix">
                                                    <el-row type="flex"  justify="space-between" :gutter="20">
                                                        <el-col :span="24"><h3 class="whiteFont text-center">自提件签收</h3></el-col>
                                                    </el-row>
                                                </div>
                                                <div class="text item text-center">
                                                    {{Data.zt_sign}}
                                                </div>
                                            </el-card>
                                        </el-col>
                                        <el-col :span="8"  >
                                            <el-card class="box-card">
                                                <div slot="header" class="clearfix">
                                                    <el-row type="flex"  justify="space-between" :gutter="20">
                                                        <el-col :span="24"><h3 class="whiteFont text-center">派送件签收</h3></el-col>
                                                    </el-row>
                                                </div>
                                                <div class="text item text-center">
                                                    {{Data.ps_sign}}
                                                </div>
                                            </el-card>
                                        </el-col>
                                        <el-col :span="8"  >
                                            <el-card class="box-card">
                                                <div slot="header" class="clearfix">
                                                    <el-row type="flex"  justify="space-between" :gutter="20">
                                                        <el-col :span="24"><h3 class="whiteFont text-center">预计收入</h3></el-col>
                                                    </el-row>
                                                </div>
                                                <div class="text item text-center">
                                                    {{Data.income}}
                                                </div>
                                            </el-card>
                                        </el-col>
                                    </el-row>
                                </el-col>
                            </el-row>
                        </div>
                    </div>
                </div>
            </el-col>
        </el-row>
    </div>
</template>

<script>
    import api from '../apis'
    export default {
        name: "Index",
        data(){
            return {
                //列表加载动画
                listLoading:false,
                //列表数据
                Data:{

                },
            }
        },
        methods:{
            /**
             * 请求数据
             */
            query(){
                api.index.fetch().then(response=>{
                    this.Data = response.data.data;
                }).catch(errors=>{
                    this.$message.error('请求失败');
                })
            },
        },
        mounted(){
            this.query();
        },
    }
</script>

<style lang="scss" scoped>
    .box-card{
        width:50%;
        height: 200px;
        margin: 20px auto 0;
        font-size:24px;
    }
</style>
